package com.sjy.ylxt.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.support.StandardServletMultipartResolver;

import javax.servlet.MultipartConfigElement;
import javax.servlet.ServletRegistration;

@Configuration
public class WebMvcConfig {
    @Bean
    public MultipartResolver multipartResolver() {
        // 使用StandardServletMultipartResolver作为MultipartResolver实现
        StandardServletMultipartResolver multipartResolver = new StandardServletMultipartResolver();
        // 可以进一步配置其他属性，例如文件大小限制等，但通常这些在web.xml或通过@MultipartConfig注解在Servlet上进行配置
        return multipartResolver;
    }


}